package com.shensi.adminCollect.service.fleet.impl;

import com.shensi.adminCollect.domain.fleet.FleetSubcard;
import com.shensi.adminCollect.mapper.fleet.FleetSubcardMapper;
import com.shensi.adminCollect.service.fleet.FleetSubcardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther: LogicQin
 * @Date: 2023/5/10 18:57
 * @Description:
 */


@Service
public class FleetSubcardServiceImpl implements FleetSubcardService {
    private final FleetSubcardMapper fleetSubcardMapper;

    @Autowired
    public FleetSubcardServiceImpl(FleetSubcardMapper fleetSubcardMapper) {
        this.fleetSubcardMapper = fleetSubcardMapper;
    }

    @Override
    public FleetSubcard getFleetSubcardById(Integer id) {
        return fleetSubcardMapper.selectFleetSubcardById(id);
    }

    @Override
    public List<FleetSubcard> getAllFleetSubcards() {
        return fleetSubcardMapper.selectAllFleetSubcards();
    }

    @Override
    public void createFleetSubcard(FleetSubcard fleetSubcard) {
        fleetSubcardMapper.insertFleetSubcard(fleetSubcard);
    }

    @Override
    public void updateFleetSubcard(FleetSubcard fleetSubcard) {
        fleetSubcardMapper.updateFleetSubcard(fleetSubcard);
    }

    @Override
    public void deleteFleetSubcardById(Integer id) {
        fleetSubcardMapper.deleteFleetSubcardById(id);
    }

    @Override
    public void deleteFleetSubcardsByIds(List<Integer> ids) {
        fleetSubcardMapper.deleteFleetSubcardsByIds(ids);
    }
}
